package net.esj.basic.utils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import net.esj.basic.pojo.MObject;
import net.esj.basic.pojo.PrimaryKey;

import org.apache.commons.lang.StringUtils;

public abstract class MObjectUtils {

	public static final boolean equals(MObject o1,MObject o2){
		if(o1==null || o2 == null){
			return false;
		}
		
		return StringUtils.equals((String)o1.getId(), (String)o2.getId()) &&  StringUtils.equals(o1.getMType(), o2.getMType());
	}
	
	public static final boolean isTypeOf(MObject o1,String mtype){
		return StringUtils.equals(o1.getMType() ,mtype);
	}
	
}
